
#include "image_cutting_together.h"


std::vector<cv::Mat> image_cutter_together::image_cutter(cv::Mat &image_to_cut,
 const int & y1 ,  const int & y2)
{
    std::vector<cv::Mat>   vector_result;
    cv::Mat out1;
    cv::Mat out2;
    cv::Mat out3;
    cv::Mat out4;
    cv::Mat out5;
    cv::Mat out6;
    cv::Mat out7;
    cv::Mat out8;
    cv::Mat out9;
    cv::Rect rect1(0, 0, 1300, y1);
    cv::Rect rect2(1300, 0, 1300, y1);
    cv::Rect rect3(2600, 0, 1469, y1);
    cv::Rect rect4(0, y1, 1300, y2-y1);
    cv::Rect rect5(1300, y1, 1300, y2-y1);
    cv::Rect rect6(2600, y1, 1469, y2-y1);
    cv::Rect rect7(0, y2, 1300, 3000-y2);
    cv::Rect rect8(1300, y2, 1300, 3000-y2);
    cv::Rect rect9(2600, y2, 1469, 3000-y2);
    out1 = image_to_cut(rect1);
    out2 = image_to_cut(rect2);
    out3 = image_to_cut(rect3);
    out4 = image_to_cut(rect4);
    out5 = image_to_cut(rect5); 
    out6 = image_to_cut(rect6);
    out7 = image_to_cut(rect7); 
    out8 = image_to_cut(rect8);
    out9 = image_to_cut(rect9);
    vector_result.push_back(out1);
    vector_result.push_back(out2);
    vector_result.push_back(out3);
    vector_result.push_back(out4);
    vector_result.push_back(out5);
    vector_result.push_back(out6);
    vector_result.push_back(out7);
    vector_result.push_back(out8);
    vector_result.push_back(out9);
    return vector_result;
}


bool image_cutter_together::image_together_Horizontal(cv::Mat &image_left, cv::Mat &image_right, cv::Mat &result)
{
      cv::hconcat(image_left,image_right,result);
      return true;
}


bool image_cutter_together::image_together_vertical(cv::Mat &image_up, cv::Mat &image_down, cv::Mat &result)
{
    cv::vconcat(image_up,image_down,result);
    return true;
}


image_cutter_together::image_cutter_together()
{

}
image_cutter_together::~image_cutter_together()
{

}